import request from '@/utils/request'
import { memberApi } from '@/utils/comm'

// 查询列表
export function listCertificateTrainingSite(query) {
  return request({
    url: `${memberApi}/certificateTrainingSite/list`,
    method: 'get',
    params: query
  })
}

// 查询详情
export function getCertificateTrainingSite(id) {
  return request({
    url: `${memberApi}/certificateTrainingSite/` + id,
    method: 'get'
  })
}

// 新增
export function addCertificateTrainingSite(data) {
  return request({
    url: `${memberApi}/certificateTrainingSite`,
    method: 'post',
    data: data
  })
}

// 修改
export function updateCertificateTrainingSite(data) {
  return request({
    url: `${memberApi}/certificateTrainingSite`,
    method: 'put',
    data: data
  })
}

// 删除
export function delCertificateTrainingSite(id) {
  return request({
    url: `${memberApi}/certificateTrainingSite/` + id,
    method: 'delete'
  })
}

// 查询所有飞员考证训练目的地列表
export function listAllCertificateTrainingSite(query) {
  return request({
    url: `${memberApi}/certificateTrainingSite/optionSelect`,
    method: 'get',
    params: query
  })
}